<template>
    <div>
        <h2>TestCom组件</h2>
        <div>
            {{ money }}
        </div>
        <div>
            {{ a }}--{{ b }}--{{ c }}
        </div>
        <button @click="$emit('handle', money)"></button>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

const money = ref(100)
interface Props {
    a: string
    b: number
    c: boolean
}
const { a = 'bread', b = 2, c = true } = defineProps<Props>()
defineEmits<{
    (e: 'handle', money: number): void
}>()
defineExpose({
    money
})
</script>

<style scoped></style>